import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Main from '../views/main.vue'
Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: '登录页面',
    component: Login
  },
  {
    path: '/index',
    name:'index',
    component: ()=>import('../views/main/index')
  },
  {
    path: '/newsMuban',
    name:'中央党新闻',
    component: ()=>import('../views/main/newsNoticy/newsMuban'),
  },
  {
    path: '/branch',
    name:'展示支部',
    component: ()=>import('../views/main/keyBranch/branch'),
  },

  {
    path: '/selectAdminById',
    name:'支部成员信息',
    component: ()=>import('../views/main/keyBranch/selectAdminById'),
  },

  // {
  //   path: '/learnAndSubmit',
  //   name:'学习提交',
  //   component: ()=>import('../views/main/task/son/learnRecord/learnAndSubmit'),
  // },
  // {
  //   path: '/queryRecord',
  //   name:'查看提交记录',
  //   component: ()=>import('../views/main/task/son/selectRecord/queryRecord'),
  // },


  {
    path: '/reservation',
    name:'三会一课任务',
    component: ()=>import('../views/main/task/reservation'),
    children:[
      {
        path: '/queryRecord',
        name:'查看提交记录',
        component: ()=>import('../views/main/task/son/selectRecord/queryRecord'),
      },
      {
        path: '/learnAndSubmit',
        name:'学习提交',
        component: ()=>import('../views/main/task/son/learnRecord/learnAndSubmit'),
      },
      {
        path: '/afterKnow',
        name:'学习流程',
        component: ()=>import('../views/main/task/son/afterKnow'),
      },
      {
        path: '/appointmentsectionchoose',
        name:'提交学习的记录',
        component: ()=>import('../views/main/task/son/appointmentsectionchoose'),
      },
      {
        path: '/resultselect',
        name:'查看学习提交的记录',
        component: ()=>import('../views/main/task/son/resultselect'),
      },
    ]
  },

  {
    path: '/phylogeny',
    name:'党的发展史',
    component: ()=>import('../views/main/newsNoticy/phylogeny'),
  },
  {
    path: '/main',
    name: '菜单',
    component: Main,
    children:[
      {
        path:'/myList',
        name:'个人信息',
        component:()=>import('../views/list/myList')
      },
      {
        path:'/editMyList',
        name:'修改个人信息',
        component:()=>import('../views/list/editMyList')
      },
      {
        path: '/addMember',
        name: '添加人员',
        component:()=>import('../views/member/addMember')
      },
      {
        path: '/selectMember',
        name: '查看人员',
        component:()=>import('../views/member/selectMember')
      },
      {
        path: '/permissionManage',
        name:'权限管理',
        component:()=>import('../views/permission/permissionManage')
      },
      {
        path: '/selectBranch',
        name: '查看部门',
        component:()=>import('../views/branch/selectBranch')
      },
      {
        path: '/addBranch',
        name: '添加部门',
        component:()=>import('../views/branch/addBranch')
      },
      {
        path: '/branchState',
        name: '部门状态',
        component:()=>import('../views/branch/branchState')
      },
      {
        path: '/approvalNews',
        name: '新闻审批',
        component:()=>import('../views/news/approvalNews')
      },
      {
        path: '/newsUpDown',
        name: '新闻上下线',
        component:()=>import('../views/news/newsUpDown')
      },
      {
        path: '/publishStatus',
        name: '发布状态',
        component:()=>import('../views/news/publishStatus')
      },
      {
        path: '/releaseNews',
        name: '发布新闻',
        component:()=>import('../views/news/releaseNews')
      },
      {
        path: '/noticeList',
        name: '发布公告',
        component:()=>import('../views/announcement/noticeList')
      },
      {
        path: '/checkList',
        name: '查看公告',
        component:()=>import('../views/announcement/checkList')
      },
      {
        path: '/addSummary',
        name: '添加会议纪要',
        component:()=>import('../views/summary/addSummary')
      },
      {
        path: '/selectSummary',
        name: '查看会议纪要',
        component:()=>import('../views/summary/selectSummary')
      },
      {
        path: '/meetingClass',
        name: '三会一课',
        component:()=>import('../views/scheduling/meetingClass')
      },
      {
        path: '/learnStatistical',
        name: '学习提交统计',
        component:()=>import('../views/statistics/learnStatistical')
      },

    ]
  },

  // {
  //   path: '/jd',
  //   name: 'jd',
  //   component: ()=>import('../views/jd.vue')
  // },

]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
